package com.powernode.reflect.pojo;

/**
 * @author : zjj
 * @date : 2022/9/21 10:39
 */
public class Person {

    private String username;
    private String password;
    private Integer age;

    public Person() {
        System.out.println("person 的构造方法执行了");
    }

    public Person(String username, String password, Integer age) {
        this.username = username;
        this.password = password;
        this.age = age;
    }

    @MyAnnotation(count = 1)
    public void sleep(){
        System.out.println("sleep method execute");
    }

    public void play(){
        System.out.println("play method execute");
    }

    public final String eat(String foodName,String type ){
        System.out.println(type + "吃了 ： " + foodName);
        return "success";
    }

    @Override
    public String toString() {
        return "Person{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                '}';
    }
}
